package com.youdoneed.friends.vo;

import com.youdoneed.user.model.User;

import java.util.ArrayList;
import java.util.List;

/**
 * 推荐好友和关注好友
 */
public class RecommendsFriends {

    private List<UserInfo> friendsList = new ArrayList<>();

    private List<UserInfo> friendsListByPhone = new ArrayList<>();

    public List<UserInfo> getFriendsList() {
        return friendsList;
    }

    public void setFriendsList(List<UserInfo> friendsList) {
        this.friendsList = friendsList;
    }

    public List<UserInfo> getFriendsListByPhone() {
        return friendsListByPhone;
    }

    public void setFriendsListByPhone(List<UserInfo> friendsListByPhone) {
        this.friendsListByPhone = friendsListByPhone;
    }

    public static class UserInfo {
        private User user;
        private Long mutualFriendCount;
        private Integer handleFlag;
        private Long registerTime;
        private String confirmId;

        public User getUser() {
            return user;
        }

        public void setUser(User user) {
            this.user = user;
        }

        public Long getMutualFriendCount() {
            return mutualFriendCount;
        }

        public void setMutualFriendCount(Long mutualFriendCount) {
            this.mutualFriendCount = (mutualFriendCount == null ? 0L : mutualFriendCount);
        }

        public Integer getHandleFlag() {
            return handleFlag;
        }

        public void setHandleFlag(Integer handleFlag) {
            this.handleFlag = handleFlag;
        }

        public Long getRegisterTime() {
            return registerTime;
        }

        public void setRegisterTime(Long registerTime) {
            this.registerTime = registerTime;
        }

        public String getConfirmId() {
            return confirmId;
        }

        public void setConfirmId(String confirmId) {
            this.confirmId = confirmId;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (!(o instanceof UserInfo)) {
                return false;
            }

            UserInfo userInfo = (UserInfo) o;

            return user != null ? user.equals(userInfo.user) : userInfo.user == null;
        }

        @Override
        public int hashCode() {
            return user != null ? user.hashCode() : 0;
        }
    }

}
